use std::collections::HashMap;
struct Solution {}

impl Solution {
  pub fn uncommon_from_sentences(s1: String, s2: String) -> Vec<String> {
    let mut map = HashMap::new();
    let mut deleted = HashMap::new();
    let s1 = s1 + " " + &s2;
    s1.split_whitespace().for_each(|i| {
      if map.contains_key(i) || deleted.contains_key(i) {
        map.remove(i);
        deleted.insert(i, 1);
      } else {
        map.insert(i, 1);
      }
    });
    map.keys().map(|x| String::from(*x)).collect()
  }
}